package com.dep.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 功能描述
 * @description 时间区间查询条件
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class TimeQueryRequest extends PageRequest implements Serializable {
    @ApiModelProperty(value = "开始时间 yyyy-MM-dd HH:mm:ss")
    @Pattern(regexp = "^$|^(19|20)\\d{2}\\-[01]\\d\\-[0123]\\d\\s\\d{2}\\:\\d{2}\\:\\d{2}$", message = "日期格式不正确，如yyyy-MM-dd HH:mm:ss")
    private String startTime;
    @ApiModelProperty(value = "结束时间 yyyy-MM-dd HH:mm:ss")
    @Pattern(regexp = "^$|^(19|20)\\d{2}\\-[01]\\d\\-[0123]\\d\\s\\d{2}\\:\\d{2}\\:\\d{2}$", message = "日期格式不正确，如yyyy-MM-dd HH:mm:ss")
    private String endTime;

}
